Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getYearMonthText incorrect months #627

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DeanStr
Copy link

@DeanStr DeanStr commented Nov 5, 2024

Months was essentially calculated off a 48 week year, or each month being exactly 4 weeks, which leads to the wrong output for airplane and fleet ages.

Under the old function:
51 weeks = 0 months
52 weeks = 1 year 1 months
479 weeks = 9 years 11 months
480 weeks = 9 years 0 months

With this fix:
51 weeks = 11 months
52 weeks = 1 year and 0 months
479 weeks = 9 years 2 months
480 weeks = 9 years 2 months

Months was essentially calculated off a 48 week year, or each month being exactly 4 weeks, which isn't correct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant